import request from '@/utils/request'

// 查询朝代信息列表
export function listDynasties(query) {
  return request({
    url: '/dynasties/dynasties/list',
    method: 'get',
    params: query
  })
}

// 查询朝代信息详细
export function getDynasties(id) {
  return request({
    url: '/dynasties/dynasties/' + id,
    method: 'get'
  })
}

// 新增朝代信息
export function addDynasties(data) {
  return request({
    url: '/dynasties/dynasties',
    method: 'post',
    data: data
  })
}

// 修改朝代信息
export function updateDynasties(data) {
  return request({
    url: '/dynasties/dynasties',
    method: 'put',
    data: data
  })
}

// 删除朝代信息
export function delDynasties(id) {
  return request({
    url: '/dynasties/dynasties/' + id,
    method: 'delete'
  })
}
